package com.ndbg.demo.exception;

public enum CommonFailureCause implements FailureCause{
    OTHER_ERROR(Integer.valueOf("00001"), "其它异常")
    ;

    /**
     * 异常编码
     *
     * @return 异常错误码
     */
    @Override
    public Integer getCode() {
        return code;
    }

    /**
     * 异常原因
     *
     * @return 异常错误信息
     */
    @Override
    public String getMessage() {
        return message;
    }

    CommonFailureCause(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    private final Integer code;
    private final String message;
}
